package com.hrms.controller;


import com.hrms.pojo.EmpInformation;
import com.hrms.service.EmpInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author LK
 * @since 2021-10-19
 */
@RestController
@RequestMapping("/empInformation")
public class EmpInformationController {
    @Autowired
    EmpInformationService empInformationService;

    @RequestMapping("/empList")
    public HashMap<String,Object> listPage(EmpInformation emp){
        return empInformationService.select(emp);

    }
    //修改
    @RequestMapping("/update")
    public HashMap<String,Object>  update(EmpInformation emp){
        return empInformationService.update(emp);
    }
    //新增
    @RequestMapping("/add")
    public HashMap<String,Object> add( EmpInformation emp){
        return empInformationService.add(emp);
    }

    //删除
    @RequestMapping("/del")
    public HashMap<String,Object> del(Integer id){
        return empInformationService.del(id);
    }
}

